Added the resize functionality for hash_locked which is turned on/off at the start by defining it