revert to working code until further development