minor tweak to former solution