Separated some code