initial implementation of det