Added pseudo code and group evaluation