client code review and allocatehardware issue fixed