little bit improvements and correcting errors