sh implementation