use forward declaration instead of moving function