creating nicer code