nearly finished param checking