simple wrapper function for js