made all code more consistent