added abf function

removes dependency on randomFunctions