added calling context to some function options
added some tests