used more method variables to clean API