lab1_5 use pure procedures and functions