removed SimpeCap (fixed it in tabular_data)
removing simple_cap function
Made it work with a general case (fixed several bugs)