added invert layer