modified tests and corrected the id bug