first shot at a complete version