removed some cout's, also modified to use correct abs