working on lock and algorithm change functionalities