minor refactoring
Use total_seconds() for display
minor refactoring; bug fix on input param