debugged version 05/05/2013 II