changed structure and added data access