functions implemented.