Issue40 41

formatting & merge with upstream