uses get func and checks input