Created working proof of concept hook - needs refining