cleaned up grade factory