getting single to work. It passes test, but not sure if it's 100% correct