FIX: code refactor