removed most of the code, starting from scratch