Added checks for entered values