First part of final version