slightly less code to get it done