added comment, cleant up code