recoded this, now prettier: