I am not sure if there is a better way of doing this :(