add new function and format other files