could be made faster at 6P but meh