fix reusable bugs and validate date