alpha and theta functions added