add sorting prototype