UPDATED: fixed missing linspace errors