small alterations of code