adding midnight feature