Re-implemented tuning to keep logic in step function