remove logging here as you do this outside this function