This is not a great way of doing this, but I can improve it in a bit