implement error as package