add layer class and match method