solved problem 10 and added a common file for commonly used functions