derivatives somewhat working now