warning: there is not allwways returned a value