need to test out updated function