cleaned up the structure a bit