modified to my needs