full chain refactored, still needs work