block class and functions