Revise code to add hour correctly