removed redundant checking in getSingle and updated tests