structures fixed and improved (belongs to #17)