Handle refactored. changed to be called through command.