expiration is now a time.Time
adding tests, fixing logic