completed function programming