added getcontacts method with arbitrary number of contacts and finished off other methods