this should be moved elsewhere to get rid of speed