main class

Modified some conditionals by typecasting some values.