updated guess code

declared variables together