need a better way of doing this...