added return values to iamgesensor