initial port from epitome. things are still broken.