fixed roberts code