added am block functions.