Not the cleanest but it will do