changed hard coded numbers to variables