preliminary spiral code