Added existing code from google repository