added some derivative stuff