big code refactory