Implemented Layer 2 and wrote test