CHANGE: added plane intersection code