revised clear(), need debug
updated todo