added addGroup
added check for parameter type
added more checks