Edited methods to make them work, added tests