refactored it a bit

a