refactioring and optimization of init
rename ids to be more unique
now can be closed by enter