fixed errors and add component classes