cleanup and added very big factorial restrictions