slight refactoring transfering to laptop