refactoring all lab