python lab solns: put one function earlier