Added Y check. And uncompleted unit test