parseTime method implemented