renamed package names and redefined some structures