added support for passing fraction