Redone some methods and add some checks