trying a different approach to declaration after statement warning