added a lot of beta/stuff code