added a function from stackoverflow to ls objects and their size