creating new function as c