This is probably the best way to solve this