created method to read classes directory