worked on input, still need to add checks