fixed problem with return value