added type refinements to generic mutable module