master
Added generic function