added first pass at code