Add common function in a separate class