works; ready to simpilfy the grepl stuff