I need to find a better way of doing this...