some code for loading, clipping lcad data