finished essential methods and data structures