you are right, code will not work in most cases