finally closed #1, some cosmetic changes added