working derivatives!
make it table driven