initial checkin of working version