check if logic right