Not playing nice... probably needs refactoring...