modified current and added new metric functions that using django instead of loops