fixing date issue and enhancement