added code for two more functions