required functions implemented