move the code to Addon#available?