Issue 39: tried to optimize, but this is a new speciality to me