Added range checking to values
Added range checking to values for time
Small update