add compile function to webpage