added compile functionality