Frist working version. For part one