creating variables and conditions