states added and basic behaviour in for search