is there a more concise way of doing this?