changes not yet fully tested