make functionality more reusable