why is this a def? always evaluated twice