adding mine and tewodros' code