fixed code to pass tests