code fixing, extra function