finally working properly