fixed some types, added thorough checking for group parameters