functions are implemented