cleanup a little and add getData()