moving code from Google Code