fixed bug in subject managing
implemented groups managing