refactoring using file class
changed minus to hide and plus to show
using class