returns value correctly