updated function to not make call