more commenting, code refining
bug fix