remove unnecessary call to function