made a reduce step more consice thanks to 1wheel (Adam Pearce)