storing date properly