project refactored by mafiya