fixed code to pass tests

tests were failing and now they're not