few code added in function