Refractor to seperate methods