allow behaviour specifying through an options object