updated julia function