still solving some bugs but this is the latest