fixed bug, HC now works, need to work on the output