Started implementation of detect goal