function options added @vjovanov

There are some problems with this function, that need to be discussed