added commends and some small improvements