removed a print call
code simplification and beautification