refactor, cleaner code