better layer attachment