minor changes and added callback in test and remove the unwanted lines in spec