this seems to work now. removed commented out code