This could probably be a lot shorter but I have deadlines!