adding some locking mechanism for rpm