less dumb way of doing this