closetrabbit implementation, almost working