refactored everything so that html ID is set from the constructor