refactor remanme some vars