allowing for two functions