branches and scope working for the most part. still need to write many tests