replace Runnables with lambda functions