Now takes integer, cleaned up some printfs.