Add ability to set d and theta