moved more logic from renderer into geometry