use detect instead of select
update README