get rid of anon function