passed a test and made it functional