renamed many functions