complete most of functions