Added sorting and generation of current date