added angle generation;removed redundant (?) bond flipping