added some code to use crestlines