it's horribly broken, but it's a start for basic functionality