initial fuction framework