move calculations to Component.php