Need some changes yet but works correct