added return fucntionality