small changes and extensions