used constants, removed unused variable