Adding priority method to thread