furhter layering, fixed 2. bug