change some funcs into methods
simplify methods