restructuring to use kwargs