refactored update once again