double checked that this version corresponds with florian's