refactored code and added album_exists functionality