initial checkin / port from huit github