made certain methods private and moved to_s from private section