wrote group model and tests