refactored - looking much nicer.