making this work properly