removing constant and fixing bugs