Made adjusted_amount calculation more programmatic