There's definitely a better way of doing this :s