made functions green, removed unused variables