fix by day
adding test - Fixed #234 #175