added more methods, error classes