fix bug + return in correct format