implementation of simpletree