Create ucb.py

Abstraction and background functions