Seperated some logic