Tried to make the methods more independent