seperated out altar code and added option