debugged more of simple pi