to be debugged version