added more geometry functions