added some error handling and removed taxidmaping