Changed to a better, less API breaking implementation