made more reusable