more basic functions and init states