fixing code to build