implement complete menu locking logic