Locking storage

please review and merge ir ;-)