Final version without bugs