for some reason, if statement doesn't work well, I'll check it after commitment