added more functionalailty that needs testing