new function on codefregment page