simplifying snippet