improved things + re-arranged lines