1st veriosn
various bug fixes