implements some functions