Enhancement: delete redundant code