Separated stuff into methods