added layer_stack class