move feature functionality to separate file