improved my time func
chap 4 ex 3
chap 4 ex 5