first version - fully functional