Main function works for simple case. Cleaned up Reject