somehow semi-functional code.