this works, but isn't right. needs refactored