function updates and new function added