user functions implemented