added data structures efficiency