updated with new and improved test