coded up some beta compressing level routines