Bug fixing, added new methods