moved check to user side