better structure, lots of improvements