Modificaiton in the input receiving logic. Not fully functional though