proof of concept code for analysis library (sort of)