Changed code back to working version.