format and debug reviewed, everything should now be ok