cleaning up code based on feedback, allowing arguments without an array