fixed jeffs code