change to alternative way for easier logic