add class + lil refactor