some extra prints and comments were removed