Might want to nest this as it is a little unreadable.