changes to be more reusable. less code.