added working functionality with manual inputs of time