updated clear(), added toString()