refactored and added more info