debugged for compile