simplified method at() and added some expection tests for this method