adding amirs version

because amirs version is better than mine