added methods to common
updated solution to problem 5