cleaned up assembly code