added input class
added global variables
changed some constants' names