implemented preferences in method generation