fully works for bin scripts